<#macro showImg img>
	<img src="${displayStaticLocation?default("")}admin/image/${img}"/>
</#macro>
<#macro showImgI18N img>
	<img src="${displayStaticLocation?default("")}admin/image/zh_cn/${img}"/>
</#macro>

<#macro showJs js>
<script language="javascript" src="${displayStaticLocation?default("")}admin/js/${js}" type="text/javascript"></script>
</#macro>

<#macro showStyle cs>
<link href="${displayStaticLocation?default("")}admin/css/${cs}" rel="stylesheet" type="text/css" />
</#macro>
<#macro showStyleI18N cs>
<link href="${displayStaticLocation?default("")}admin/css/zh_cn/${cs}" rel="stylesheet" type="text/css" />
</#macro>

 <#macro majortypeSelect selId selName majortypeList selectedId showDefault=true>
 	<select id="${selId}" name="${selName}">
 		<#if showDefault>
 			<option value="">--请选择--</option>
 		</#if>
 		<#if majortypeList??>
 			<#list majortypeList as majortype>
 				<option value=${(majortype.id)?if_exists} <#if majortype.id == selectedId>selected</#if>>${(majortype.majorTypeName)?if_exists}</option>
 			</#list>
 		</#if>
 	</select>
 </#macro>
 
 <#macro userSelect selId selName userList selectedId showDefault=true>
 	<select id="${selId}" name="${selName}">
 		<#if showDefault>
 			<option value="0">--请选择--</option>
 		</#if>
 		<#if userList??>
 			<#list userList as user>
 				<option value="${(user.id)?if_exists}" <#if user.id == selectedId>selected</#if>>${(user.name)?if_exists}</option>
 			</#list>
 		</#if>
 	</select>
 </#macro>
 
 <#macro showAdmission thevalue>
 	<#if thevalue==1>
		很重要
	<#elseif thevalue==2>
		重要
	<#elseif thevalue==3>
	          考虑
	<#elseif thevalue==4>
		不考虑
	</#if>
 </#macro>
 
 <#macro admissionSelect selId selName selectedId showDefault=true>
 	<select id="${selId}" name="${selName}">
 		<#if showDefault>
 			<option value=0>--请选择--</option>
 		</#if>
		<option value=1 <#if 1 == selectedId>selected</#if>>很重要</option>
		<option value=2 <#if 2 == selectedId>selected</#if>>重要</option>
		<option value=3 <#if 3 == selectedId>selected</#if>>考虑</option>
		<option value=4 <#if 4 == selectedId>selected</#if>>不考虑</option>
 	</select>
 </#macro>
 
 <#macro showSex sexValue>
	<#if sexValue==0>
		女
	<#elseif sexValue==1>
		男
	</#if>
 </#macro>
 
  <#macro sexSelect selId selName selectedId showDefault=true>
 	<select id="${selId}" name="${selName}">
 		<#if showDefault>
 			<option value=0>--请选择--</option>
 		</#if>
		<option value=0 <#if 0 == selectedId>selected</#if>>女</option>
		<option value=1 <#if 1 == selectedId>selected</#if>>男</option>
 	</select>
 </#macro>
 
  <#macro showSchoolType typevalue>
	<#if typevalue==0>
		私立
	<#elseif typevalue==1>
		公立
	</#if>
 </#macro>
 
  <#macro schoolTypeSelect selId selName selectedId showDefault=true>
 	<select id="${selId}" name="${selName}" style='width:157px;'>
 		<#if showDefault>
 			<option value=-1>--请选择--</option>
 		</#if>
		<option value=0 <#if 0 == selectedId>selected</#if>>私立</option>
		<option value=1 <#if 1 == selectedId>selected</#if>>公立</option>
 	</select>
 </#macro>
 
   <#macro showSchoolTerms thevalue>
	<#if thevalue==0>
		学季
	<#elseif thevalue==1>
		学期
	</#if>
 </#macro>
 
  <#macro schoolTermsSelect selId selName selectedId showDefault=true>
 	<select id="${selId}" name="${selName}" style='width:157px;'>
 		<#if showDefault>
 			<option value=-1>--请选择--</option>
 		</#if>
		<option value=0 <#if 0 == selectedId>selected</#if>>学季</option>
		<option value=1 <#if 1 == selectedId>selected</#if>>学期</option>
 	</select>
 </#macro>
 
 <#macro showProcess value>
 	<div style="position:relative; border:1px #CCC solid; height:16px; width:100%; margin:0 auto; padding:1px">  
    	<div style=" background:#3F9; height:16px; width:${value!0}%"></div>  
    	<strong style="position:absolute; width:100%; top:1px; text-align:center; overflow:hidden">${value!0}%</strong>  
 	</div>  
 </#macro>
 
 <#macro showProcess2 value>
 	<div style="position:relative; border:1px #CCC solid; height:16px; width:150px; margin:0 auto 0 0; padding:1px">  
    	<div style="background:#3F9; height:16px; width:${value!0}%"></div>  
    	<strong style="position:absolute; width:150px; top:1px; text-align:center; overflow:hidden">${value!0}%</strong>  
 	</div>  
 </#macro>
 
 <#macro showMembers members>
 	<#if members?exists>
 		<#assign memberStr = ""/>
 		<#list members as member>
 			<#assign memberStr = memberStr + member.name + "," />
 		</#list>
 		<#if memberStr?ends_with(",")>
 			${memberStr?substring(0, memberStr?length - 1)}
 		<#else>
 			${memberStr}
 		</#if>
 	</#if>
 </#macro>
 
 <#macro isChecked members userId>
 	<#if members?exists>
 		<#list members as member>
 			<#if member.id == userId>
 				checked
 			</#if>	
 		</#list>
 	</#if>
 </#macro>
 
 <#macro showRoles roleList>
 	<#if roleList?exists>
 		<#assign roleName = "" />
 		<#list roleList as role>
 			<#assign roleName = roleName + role.name + "," />
 		</#list>
 		<#if roleName?ends_with(",")>
 			${roleName?substring(0, roleName?length - 1)}
 		<#else>
 			${roleName}
 		</#if>
 	</#if>
 </#macro>
 